﻿<UserControl x:Class="SaryaAccounting.UserSelection.LoginUserSelector"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:basis="clr-namespace:Tanmia.Basis.WPF.Controls;assembly=Tanmia.Basis"
             MinWidth="375" MinHeight="90">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="100" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="30" />
            <RowDefinition Height="30" />
            <RowDefinition Height="30" />
        </Grid.RowDefinitions>
        
        <Label Content="{basis:Labeler Path=Entity.Username}" Grid.Column="0" Grid.Row="0" Focusable="False" />
        <TextBox Text="{Binding Path=Entity.Username, NotifyOnValidationError=True, ValidatesOnDataErrors=True, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" Grid.Row="0" TabIndex="0" />

        <Label Content="{basis:Labeler Path=Entity.Password}" Grid.Column="0" Grid.Row="1" Focusable="False"/>
        <TextBox Text="{Binding Path=Entity.Password, NotifyOnValidationError=True, ValidatesOnDataErrors=True, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" Grid.Row="1" TabIndex="1" />
        
        <Canvas Grid.Column="1" Grid.Row="2" FlowDirection="LeftToRight">
            <Button Content="إغلاق" Width="80" Height="23" Canvas.Left="10" Canvas.Top="3" Command="{Binding CancelCommand}" IsCancel="True" TabIndex="3" />
            <Button Content="تسجيل الدخول" Width="80" Height="23" Canvas.Left="95" Canvas.Top="3" Command="{Binding OkCommand}" IsDefault="True" TabIndex="2" />
        </Canvas>
    </Grid>
</UserControl>
